﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;

namespace IceDog.DNC.Program.WebApi.CustomMiddleware
{
    public static class AAAATemplateMiddlewareExtensions
    {
        public static IApplicationBuilder UseAAAATemplate(this IApplicationBuilder builder)
        {
            return builder.UseMiddleware<AAAATemplateMiddleware>();
        }
    }

    public class AAAATemplateMiddleware
    {
        private readonly RequestDelegate _next;

        public AAAATemplateMiddleware(RequestDelegate next)
        {
            _next = next;
        }
        public Task Invoke(HttpContext context)
        {
            return _next(context);
        }
    }
}
